package lolwards.pack;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class StatisticsActivity extends Activity implements OnClickListener{

    /*

	*/
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.activity_statistics);
	    Button toMain = (Button)findViewById(R.id.button1);
		toMain.setOnClickListener(this);
	    napisi();
	}
	
	private void napisi(){
		     int blue = getIntent().getExtras().getInt("blue");
		     int red = getIntent().getExtras().getInt("red");
		     int dragon = getIntent().getExtras().getInt("dragon");
		     int baron = getIntent().getExtras().getInt("baron");
		TextView tt1=(TextView) findViewById(R.id.textView2);
		TextView tt2=(TextView) findViewById(R.id.textView3);
		TextView tt3=(TextView) findViewById(R.id.textView4);
		TextView tt4=(TextView) findViewById(R.id.textView1);
		
		tt1.setText("blue kills: " + blue);
		tt2.setText("red kills: " + red);
		tt3.setText("dragon kills: " + dragon);
		tt4.setText("baron kills: " + baron);
		
		
	}

	@Override
	public void onClick(View v) {
		//startActivity(new Intent("lolwards.pack.MainActivity"));
		Intent intent = new Intent(StatisticsActivity.this, MainActivity.class);
	    intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);   
	    startActivity(intent);
	}
	
	
	
	
}
